package com.sayice.design.ChainOfResponsibility;

public abstract class Support {
    Support next;
    public Support setNext(Support next){
        this.next=next;
        return this.next;
    }
    public final void support(Data data){
        resolve(data);
        if(next!=null)
            next.support(data);
        else
            System.out.println("数据已处理完成");
    }
    public abstract void resolve(Data data);
}
